<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>blmc_robots: blmc_robots::BlmcJointModules&lt; COUNT &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">blmc_robots
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classblmc__robots_1_1BlmcJointModules.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classblmc__robots_1_1BlmcJointModules-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">blmc_robots::BlmcJointModules&lt; COUNT &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This class defines an interface to a collection of BLMC joints.  
 <a href="classblmc__robots_1_1BlmcJointModules.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="blmc__joint__module_8hpp_source.html">blmc_joint_module.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:abaff382c6fd4b494ec0c17498d94919e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abaff382c6fd4b494ec0c17498d94919e"></a>
typedef Eigen::Matrix&lt; double, COUNT, 1 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a></td></tr>
<tr class="memdesc:abaff382c6fd4b494ec0c17498d94919e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines a static Eigen vector type in order to define the interface. <br /></td></tr>
<tr class="separator:abaff382c6fd4b494ec0c17498d94919e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a74910d81a89f9b1713ce8fecc69191fe"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#a74910d81a89f9b1713ce8fecc69191fe">BlmcJointModules</a> (const std::array&lt; std::shared_ptr&lt; blmc_drivers::MotorInterface &gt;, COUNT &gt; &amp;motors, const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;motor_constants, const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;gear_ratios, const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;zero_angles, const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;max_currents)</td></tr>
<tr class="memdesc:a74910d81a89f9b1713ce8fecc69191fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a new <a class="el" href="classblmc__robots_1_1BlmcJointModules.html" title="This class defines an interface to a collection of BLMC joints. ">BlmcJointModules</a> object.  <a href="#a74910d81a89f9b1713ce8fecc69191fe">More...</a><br /></td></tr>
<tr class="separator:a74910d81a89f9b1713ce8fecc69191fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4c700a8d346ceaebece38928b5e7ca6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af4c700a8d346ceaebece38928b5e7ca6"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#af4c700a8d346ceaebece38928b5e7ca6">BlmcJointModules</a> ()</td></tr>
<tr class="memdesc:af4c700a8d346ceaebece38928b5e7ca6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a new <a class="el" href="classblmc__robots_1_1BlmcJointModules.html" title="This class defines an interface to a collection of BLMC joints. ">BlmcJointModules</a> object. <br /></td></tr>
<tr class="separator:af4c700a8d346ceaebece38928b5e7ca6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a905addfe3271be5bc88bd785c5cbb032"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#a905addfe3271be5bc88bd785c5cbb032">set_motor_array</a> (const std::array&lt; std::shared_ptr&lt; blmc_drivers::MotorInterface &gt;, COUNT &gt; &amp;motors, const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;motor_constants, const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;gear_ratios, const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;zero_angles, const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;max_currents)</td></tr>
<tr class="memdesc:a905addfe3271be5bc88bd785c5cbb032"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the motor array, by creating the corresponding modules.  <a href="#a905addfe3271be5bc88bd785c5cbb032">More...</a><br /></td></tr>
<tr class="separator:a905addfe3271be5bc88bd785c5cbb032"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26d4d675142bc783c1f983d135a41a09"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a26d4d675142bc783c1f983d135a41a09"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#a26d4d675142bc783c1f983d135a41a09">send_torques</a> ()</td></tr>
<tr class="memdesc:a26d4d675142bc783c1f983d135a41a09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send the registered torques to all modules. <br /></td></tr>
<tr class="separator:a26d4d675142bc783c1f983d135a41a09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7dba81727847238fc4c42b7dca6a0ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#ac7dba81727847238fc4c42b7dca6a0ea">set_torques</a> (const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;desired_torques)</td></tr>
<tr class="memdesc:ac7dba81727847238fc4c42b7dca6a0ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register the joint torques to be sent for all modules.  <a href="#ac7dba81727847238fc4c42b7dca6a0ea">More...</a><br /></td></tr>
<tr class="separator:ac7dba81727847238fc4c42b7dca6a0ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c71bc7db0ff4cd08bc2686a244caa65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#a9c71bc7db0ff4cd08bc2686a244caa65">get_sent_torques</a> () const </td></tr>
<tr class="memdesc:a9c71bc7db0ff4cd08bc2686a244caa65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the previously sent torques.  <a href="#a9c71bc7db0ff4cd08bc2686a244caa65">More...</a><br /></td></tr>
<tr class="separator:a9c71bc7db0ff4cd08bc2686a244caa65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeefc9487da9aafde41da790968a8165e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#aeefc9487da9aafde41da790968a8165e">get_measured_torques</a> () const </td></tr>
<tr class="memdesc:aeefc9487da9aafde41da790968a8165e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the measured joint torques.  <a href="#aeefc9487da9aafde41da790968a8165e">More...</a><br /></td></tr>
<tr class="separator:aeefc9487da9aafde41da790968a8165e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af739948e89e5192eb853c7c5dcb9e87f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#af739948e89e5192eb853c7c5dcb9e87f">get_measured_angles</a> () const </td></tr>
<tr class="memdesc:af739948e89e5192eb853c7c5dcb9e87f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the measured joint angles.  <a href="#af739948e89e5192eb853c7c5dcb9e87f">More...</a><br /></td></tr>
<tr class="separator:af739948e89e5192eb853c7c5dcb9e87f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87320890796f67050faa4fa506d5142d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#a87320890796f67050faa4fa506d5142d">get_measured_velocities</a> () const </td></tr>
<tr class="memdesc:a87320890796f67050faa4fa506d5142d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the measured joint velocities.  <a href="#a87320890796f67050faa4fa506d5142d">More...</a><br /></td></tr>
<tr class="separator:a87320890796f67050faa4fa506d5142d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc94960666d33b6a5071d4cf25f7794d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abc94960666d33b6a5071d4cf25f7794d">set_zero_angles</a> (const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;zero_angles)</td></tr>
<tr class="memdesc:abc94960666d33b6a5071d4cf25f7794d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the zero_angles.  <a href="#abc94960666d33b6a5071d4cf25f7794d">More...</a><br /></td></tr>
<tr class="separator:abc94960666d33b6a5071d4cf25f7794d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ca83d65d009aaafe4522d431490bb1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#a4ca83d65d009aaafe4522d431490bb1d">get_zero_angles</a> () const </td></tr>
<tr class="memdesc:a4ca83d65d009aaafe4522d431490bb1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the zero_angles.  <a href="#a4ca83d65d009aaafe4522d431490bb1d">More...</a><br /></td></tr>
<tr class="separator:a4ca83d65d009aaafe4522d431490bb1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ef05c89eeb1ffde131f44d4f3a300c8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#a0ef05c89eeb1ffde131f44d4f3a300c8">get_measured_index_angles</a> () const </td></tr>
<tr class="memdesc:a0ef05c89eeb1ffde131f44d4f3a300c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the index_angles.  <a href="#a0ef05c89eeb1ffde131f44d4f3a300c8">More...</a><br /></td></tr>
<tr class="separator:a0ef05c89eeb1ffde131f44d4f3a300c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada76994634fd0f15fb5df311a61e97d7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#ada76994634fd0f15fb5df311a61e97d7">set_position_control_gains</a> (size_t joint_id, double kp, double kd)</td></tr>
<tr class="memdesc:ada76994634fd0f15fb5df311a61e97d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set position control gains for the specified joint.  <a href="#ada76994634fd0f15fb5df311a61e97d7">More...</a><br /></td></tr>
<tr class="separator:ada76994634fd0f15fb5df311a61e97d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a524fd41f808027190d59460a4787aea6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#a524fd41f808027190d59460a4787aea6">set_position_control_gains</a> (<a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> kp, <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> kd)</td></tr>
<tr class="memdesc:a524fd41f808027190d59460a4787aea6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set position control gains for all joints.  <a href="#a524fd41f808027190d59460a4787aea6">More...</a><br /></td></tr>
<tr class="separator:a524fd41f808027190d59460a4787aea6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6a642e6939b8587189502e4b179fdcf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceblmc__robots.html#aa1075809042ff261e4b0a20d161448b6">HomingReturnCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#ab6a642e6939b8587189502e4b179fdcf">execute_homing</a> (double search_distance_limit_rad, <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> home_offset_rad, double profile_step_size_rad=0.001)</td></tr>
<tr class="memdesc:ab6a642e6939b8587189502e4b179fdcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform homing for all joints.  <a href="#ab6a642e6939b8587189502e4b179fdcf">More...</a><br /></td></tr>
<tr class="separator:ab6a642e6939b8587189502e4b179fdcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;int COUNT&gt;<br />
class blmc_robots::BlmcJointModules&lt; COUNT &gt;</h3>

<p>This class defines an interface to a collection of BLMC joints. </p>
<p>It creates a BLMCJointModule for every blmc_driver::MotorInterface provided.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">COUNT</td><td></td></tr>
  </table>
  </dd>
</dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a74910d81a89f9b1713ce8fecc69191fe"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::<a class="el" href="classblmc__robots_1_1BlmcJointModules.html">BlmcJointModules</a> </td>
          <td>(</td>
          <td class="paramtype">const std::array&lt; std::shared_ptr&lt; blmc_drivers::MotorInterface &gt;, COUNT &gt; &amp;&#160;</td>
          <td class="paramname"><em>motors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;&#160;</td>
          <td class="paramname"><em>motor_constants</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;&#160;</td>
          <td class="paramname"><em>gear_ratios</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;&#160;</td>
          <td class="paramname"><em>zero_angles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;&#160;</td>
          <td class="paramname"><em>max_currents</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a new <a class="el" href="classblmc__robots_1_1BlmcJointModules.html" title="This class defines an interface to a collection of BLMC joints. ">BlmcJointModules</a> object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">motors</td><td></td></tr>
    <tr><td class="paramname">motor_constants</td><td></td></tr>
    <tr><td class="paramname">gear_ratios</td><td></td></tr>
    <tr><td class="paramname">zero_angles</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ab6a642e6939b8587189502e4b179fdcf"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceblmc__robots.html#aa1075809042ff261e4b0a20d161448b6">HomingReturnCode</a> <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::execute_homing </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>search_distance_limit_rad</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a>&#160;</td>
          <td class="paramname"><em>home_offset_rad</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>profile_step_size_rad</em> = <code>0.001</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Perform homing for all joints. </p>
<p>If one of the joints fails, the complete homing fails. Otherwise it loops until all joints finished. If a joint is finished while others are still running, it is held at the home position.</p>
<p>See <a class="el" href="classblmc__robots_1_1BlmcJointModule.html#abb2712542f3c340bc0ecf76bd343b6b3" title="Perform one step of homing on encoder index. ">BlmcJointModule::update_homing</a> for details on the homing procedure.</p>
<p>See <a class="el" href="classblmc__robots_1_1BlmcJointModule.html#aa534604b5ead6a3eee5c47a9454f6834" title="Initialize the homing procedure. ">BlmcJointModule::init_homing</a> for description of the arguments.</p>
<dl class="section return"><dt>Returns</dt><dd>Final status of the homing procedure (either SUCCESS if all joints succeeded or the return code of the first joint that failed). </dd></dl>

</div>
</div>
<a class="anchor" id="af739948e89e5192eb853c7c5dcb9e87f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::get_measured_angles </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the measured joint angles. </p>
<dl class="section return"><dt>Returns</dt><dd>Vector </dd></dl>

</div>
</div>
<a class="anchor" id="a0ef05c89eeb1ffde131f44d4f3a300c8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::get_measured_index_angles </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the index_angles. </p>
<p>There is one index per motor rotation so there are gear_ratio indexes per joint rotation.</p>
<dl class="section return"><dt>Returns</dt><dd>Vector </dd></dl>

</div>
</div>
<a class="anchor" id="aeefc9487da9aafde41da790968a8165e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::get_measured_torques </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the measured joint torques. </p>
<dl class="section return"><dt>Returns</dt><dd>Vector </dd></dl>

</div>
</div>
<a class="anchor" id="a87320890796f67050faa4fa506d5142d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::get_measured_velocities </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the measured joint velocities. </p>
<dl class="section return"><dt>Returns</dt><dd>Vector </dd></dl>

</div>
</div>
<a class="anchor" id="a9c71bc7db0ff4cd08bc2686a244caa65"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::get_sent_torques </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the previously sent torques. </p>
<dl class="section return"><dt>Returns</dt><dd>Vector </dd></dl>

</div>
</div>
<a class="anchor" id="a4ca83d65d009aaafe4522d431490bb1d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::get_zero_angles </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the zero_angles. </p>
<p>These are the joint angles between the starting pose and the zero theoretical pose of the urdf.</p>
<dl class="section return"><dt>Returns</dt><dd>Vector </dd></dl>

</div>
</div>
<a class="anchor" id="a905addfe3271be5bc88bd785c5cbb032"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::set_motor_array </td>
          <td>(</td>
          <td class="paramtype">const std::array&lt; std::shared_ptr&lt; blmc_drivers::MotorInterface &gt;, COUNT &gt; &amp;&#160;</td>
          <td class="paramname"><em>motors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;&#160;</td>
          <td class="paramname"><em>motor_constants</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;&#160;</td>
          <td class="paramname"><em>gear_ratios</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;&#160;</td>
          <td class="paramname"><em>zero_angles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;&#160;</td>
          <td class="paramname"><em>max_currents</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the motor array, by creating the corresponding modules. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">motors</td><td></td></tr>
    <tr><td class="paramname">motor_constants</td><td></td></tr>
    <tr><td class="paramname">gear_ratios</td><td></td></tr>
    <tr><td class="paramname">zero_angles</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ada76994634fd0f15fb5df311a61e97d7"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::set_position_control_gains </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>joint_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>kp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>kd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set position control gains for the specified joint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">joint_id</td><td>ID of the joint (in range <code>[0, COUNT)</code>). </td></tr>
    <tr><td class="paramname">kp</td><td>P gain. </td></tr>
    <tr><td class="paramname">kd</td><td>D gain. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a524fd41f808027190d59460a4787aea6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::set_position_control_gains </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a>&#160;</td>
          <td class="paramname"><em>kp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a>&#160;</td>
          <td class="paramname"><em>kd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set position control gains for all joints. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">kp</td><td>P gains. </td></tr>
    <tr><td class="paramname">kd</td><td>D gains. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac7dba81727847238fc4c42b7dca6a0ea"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::set_torques </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;&#160;</td>
          <td class="paramname"><em>desired_torques</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Register the joint torques to be sent for all modules. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">desired_torques</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="abc94960666d33b6a5071d4cf25f7794d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int COUNT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classblmc__robots_1_1BlmcJointModules.html">blmc_robots::BlmcJointModules</a>&lt; COUNT &gt;::set_zero_angles </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classblmc__robots_1_1BlmcJointModules.html#abaff382c6fd4b494ec0c17498d94919e">Vector</a> &amp;&#160;</td>
          <td class="paramname"><em>zero_angles</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the zero_angles. </p>
<p>These are the joint angles between the starting pose and the zero theoretical pose of the urdf.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">zero_angles</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/workspace/software/workspace/src/catkin/robots/blmc_robots/include/blmc_robots/<a class="el" href="blmc__joint__module_8hpp_source.html">blmc_joint_module.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceblmc__robots.html">blmc_robots</a></li><li class="navelem"><a class="el" href="classblmc__robots_1_1BlmcJointModules.html">BlmcJointModules</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
